<!--  -->
<template>
  <div class="tabbar">
    <!-- 底部导航栏 -->
    <van-tabbar v-model="active" active-color="#ff0000" route :z-index="999">
      <van-tabbar-item
        class="iconfont"
        icon-prefix="icon"
        icon="shouye1-copy"
        name="home"
        to="/"
        >首页</van-tabbar-item
      >
      <van-tabbar-item
        class="iconfont"
        icon-prefix="icon"
        icon="leimupinleifenleileibie2"
        name="category"
        to="/category"
        >分类</van-tabbar-item
      >
      <van-tabbar-item
        class="iconfont"
        icon-prefix="icon"
        icon="gouwucheman"
        name="cart"
        to="/cart"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item
        class="iconfont"
        icon-prefix="icon"
        icon="lianhe4"
        name="profile"
        to="/profile"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
import { Tabbar, TabbarItem } from "vant";
export default {
  data() {
    return {
      active: "home",
    };
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>